#include <YTorrent.h>
#include <fstream> 
#include <map>
#include <chrono>
#include <iostream>
#include <unordered_map>
using namespace std::chrono;
#include "net/YAddress.h"
#include "net/YTCPClient.h"
#include "net/YTCPServer.h"
#include "net/poll/SelectPoll.h"
#include <tracker/UDPTracker.h>
#include <iostream>
struct Data {

};


int main(int argc, char** args) 
{
	auto s = sizeof(long long);
	UDPTracker udpTracker("128.1.203.23", 8080);
	//UDPTracker udpTracker("127.0.0.1", 4848);
	

	udpTracker.connect();

	udpTracker.loop();
	//"7d0b131ef7dfd1411924adfddb29514c90ce05e7";

	/*YTorrent torrent;
	std::string path = "d:/[Tensei Shitara Slime Datta Ken][10][GB_JP][HEVC][1080P].torrent";
	torrent.fromTorrentFile(path);
	auto ret = torrent.toTorrentBuff();
	torrent.fromTorrentBuff(ret.c_str(), ret.length());
	std::ofstream f("d:\\me.torrent", std::ofstream::binary);
	f.write(ret.c_str(), ret.length());
	f.close();*/
	return 0;
}